package com.sk.bilibili.mapper;

import com.sk.api.annotations.Mapper;
import com.sk.bilibili.bean.Member;
import com.sk.bilibili.dto.Res;
import com.sk.bilibili.other.JsonMap;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

@Mapper
public interface MemberMapper {

    @POST("member/login")
    Observable<Res<Member>> login(@Body JsonMap map);

    @POST("member/register")
    Observable<Res<Member>> register(@Body JsonMap map);

    @GET("member/getMember")
    Observable<Res<Member>> getMember(@Query("id")Integer id);

    @GET("member/logout")
    Observable<Res<Void>> logout();

}